package cn.zjk.springframework.beans.factory.support;

import cn.zjk.springframework.beans.BeansException;
import cn.zjk.springframework.beans.factory.config.BeanDefinition;

/**
 * @author zjk
 * @CreateTime 2023/3/18 0:34
 */
public interface BeanDefinitionRegister {
    /**
     * bean注册
     * @param name
     * @param beanDefinition
     */
    void registerBeanDefinition(String name, BeanDefinition beanDefinition);

    /**
     * 使用Bean名称查询BeanDefinition
     * @param beanName
     * @return
     * @throws BeansException
     */
    BeanDefinition getBeanDefinition(String beanName) throws BeansException;

    /**
     * 判断是否包含指定名称的BeanDefinition
     * @param beanName
     * @return
     */
    boolean containsBeanDefinition(String beanName);

    /**
     *  Return the names of all beans defined in this registry.
     * 返回注册表中所有的Bean名称
     */
    String[] getBeanDefinitionNames();

}
